<div class="special-check-item-list main">
  <div class="content-container shadowbox">
    <div class="container-header"
      ng-click="specialCheckItemList.open()">
      <span>{{specialCheckItemList.specialCheckData.securityTaskBean.taskName}}</span>
      <span style="color: #e67054;font-size: 12px;margin-left: 10px;">
        {{specialCheckItemList.specialCheckData.securityTaskBean.taskStatus == '0' ? '未开始' : specialCheckItemList.specialCheckData.securityTaskBean.taskStatus == '1' ? '进行中' :specialCheckItemList.specialCheckData.securityTaskBean.taskStatus == '2' ? '待整改' : specialCheckItemList.specialCheckData.securityTaskBean.taskStatus == '3' ? '已完成' : ''}}
      </span>
      <div class="score-outer"
        ng-if="specialCheckItemList.specialCheckData.securityTaskBean.totalScore">
        <span>得分：</span>
        <span class="score">
          {{specialCheckItemList.specialCheckData.securityTaskBean.totalScore}}
        </span>
        <span class="score-txt">分(百分制)</span>
      </div>
    </div>
    <div class="main-content">
      <div class="content-outline clear">
        <div class="outline-row">
          <span class="row-label">考核分类：</span>
          <span ng-show="specialCheckItemList.type=='inner'">
            内业考核
          </span>
          <span ng-show="specialCheckItemList.type=='outer'">
            外业考核
          </span>
        </div>
        <div class="outline-row">
          <span class="row-label">考核项目：</span>
          <div class="sub-row-right"
            ng-show="specialCheckItemList.type=='inner'">
            <span
              ng-if="!specialCheckItemList.specialCheckData.checkClassifyList.length">
              无
            </span>
            <a class="pa-item-btn"
              ng-repeat="item in specialCheckItemList.specialCheckData.checkClassifyList[0].checkClassifyChilds"
              ng-click="specialCheckItemList.openItemDetail(item)"
              ng-class="{'complete': item.checkClassifyScore}">
                {{item.checkClassifyName}}
            </a>
          </div>
          <div class="sub-row-right"
            ng-show="specialCheckItemList.type=='outer'">
            <span
              ng-if="!specialCheckItemList.specialCheckData.checkClassifyList.length">
              无
            </span>
            <div
              ng-repeat="list in specialCheckItemList.specialCheckData.checkClassifyList">
              <span>{{list.checkClassifyName}}（综合得分：{{specialCheckItemList.getTotalScore(list)}}）</span>
              <a class="pa-item-btn"
                ng-repeat="item in list.checkClassifyChilds"             
                ng-click="specialCheckItemList.openItemDetail(item)"
                ng-class="{'complete': item.checkClassifyScore}">
                {{item.checkClassifyName}}
              </a>
            </div>                                    
          </div>
        </div>
        <div class="outline-row">
          <span class="row-label">考核地点：</span>
          <span>{{specialCheckItemList.specialCheckData.securityTaskBean.carryOutBidName}}</span>
        </div>
        <div class="outline-row">
          <span class="row-label">考核人：</span>
          <span>{{specialCheckItemList.specialCheckData.securityTaskBean.createUserName}}</span>
        </div>
        <div class="outline-row">
          <span class="row-label">考核单位：</span>
          <span>{{specialCheckItemList.specialCheckData.securityTaskBean.carryOutOrg}}</span>
        </div>
        <div class="outline-row">
          <span class="row-label">考核提交时间：</span>
          <span>{{specialCheckItemList.specialCheckData.securityTaskBean.checkCompletedTime}}</span>
        </div>
      </div>
      <!-- 内业待检查、待完成 -->

      <div class="content-table"  
        ng-if="specialCheckItemList.type=='inner'">
        <div class="table-operation-bar"
          ng-hide="specialCheckItemList.specialCheckData.securityTaskBean.taskStatus == '3'"
          authorization-btn="api/securityActivities/app/checkCompleted"
          ng-click="specialCheckItemList.submitCheck()">
          <div class="registration-code">
            <a class="pa-btn">提交考核</a>
          </div>
        </div>
        <div class="document-mgt main">
          <!-- 已通过 -->
          <div class="document-search-bar shadowbox">
            <div class="header-icon-outer">
              <div class="container-header">待检查</div>
            </div>
          </div>
          <!-- 书架(一级) -->
          <div class="book-shelf"
            ng-show="!specialCheckItemList.shouldTableShow">
            <div class="table-row"
              ng-repeat="row in specialCheckItemList.uncheckedDocumentList4show">
              <img
                ng-repeat="img in row"
                ng-src="{{specialCheckItemList.loadImage(img)}}"
                ng-click="specialCheckItemList.toCheckItem(img)" />
            </div>
          </div>
          <!-- 未通过 -->
          <div class="document-search-bar shadowbox" style="margin-top: 40px;">
            <div class="header-icon-outer">
              <div class="container-header">已完成</div>
            </div>
          </div>
          <!-- 书架(一级) -->
          <div class="book-shelf"
            ng-show="!specialCheckItemList.shouldTableShow">
            <div class="table-row"
              ng-repeat="row in specialCheckItemList.checkedDocumentList4show">
              <img
                ng-repeat="img in row"
                ng-src="{{specialCheckItemList.loadImage(img)}}"
                ng-click="specialCheckItemList.toCheckItem(img, true)" />
            </div>
          </div>
        </div>
      </div>
      <!-- 外业问题列表 -->
      <div class="content-table"  
        ng-show="specialCheckItemList.type=='outer'">
        <div class="table-operation-bar">
          <div class="container-header">问题列表</div>
        </div>
        <form class="base-info">
          <table class="pa-table">
            <thead>
              <tr>
                <th>内容编号</th>
                <th>巡查标段</th>
                <th>巡查分类</th>
                <th>巡查单位</th>
                <th>内容提交时间</th>
                <th>整改期限</th>
                <th>状态</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody>
              <tr
                ng-repeat="item in specialCheckItemList.specialCheckList"
                >
                <td>{{item.contentNumber}}</td>
                <td>{{item.bidName}}</td>
                <td>{{item.checkClassifyName}}</td>
                <td>{{item.responsibilityUnit}}</td>                
                <td>{{item.problemFoundTime1}}</td>
                <td>{{item.problemDeadline1}}</td>
                <td 
                  ng-class="{'has-complete':item.problemStatus == '2',
                  'ongoing':item.problemStatus == '1',
                  'after-rectify':item.problemStatus == '0'}">
                  {{item.problemStatus == 0 ? '待整改' :
                  item.problemStatus == 1 ? '待审核' : 
                  item.problemStatus == 2 ? '已完成' :
                  item.problemStatus == 3 ? '符合要求' :''}}
                </td>
                <td>
                  <div class="del"
                    authorization-btn="api/checkRecord/app/queryContentDetail"
                    ng-click="specialCheckItemList.checkDetail(item.problemId)">
                    <i class="fa fa-street-view color"></i>
                    <span class="shoushi">查看</span>
                  </div>
                  <div class="del"
                    authorization-btn="api/securityActivities/checkProblem/deleteCheckProblem"
                    ng-click="specialCheckItemList.deleteProblem(item.problemId)">
                    <i class="fa fa-trash color"></i>
                    <span class="shoushi">删除</span>
                  </div>               
                </td>
              </tr>
            </tbody>
          </table> 
        </form>
      </div>
      <!-- <div class="content-table">
        <div class="table-operation-bar">
          <div class="operantion-menu"
            ng-if="specialCheckItemList.specialCheckData.status == 1 || specialCheckItemList.specialCheckData.status == 2"
            ng-click="$state.go('documentInside', {type: 'check', id: specialCheckItemList.id})">
            <img src="../../../assets/images/rectification-icon.png"
              alt="">
            <span>内业检查</span>
          </div>
        </div>
        <form class="base-info">
          <table class="pa-table">
            <thead>
              <tr>
                <th>违规项目</th>
                <th>处理方式</th>
                <th>当前状态</th>
                <th>要求整改时间</th>
                <th>问题说明</th>
                <th>问题位置</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody>
              <tr
                ng-repeat="item in specialCheckItemList.specialCheckList"
                >
                <td>{{item.checkClassifyName}}</td>
                <td>
                  {{item.dealType == 0 ? '无问题' :
                  item.dealType == 1 ? '限期整改' : 
                  item.dealType == 2 ? '责令停工' : ''}}
                </td>
                <td 
                ng-class="{'has-complete':item.problemStatus == '2',
                'ongoing':item.problemStatus == '1',
                'after-rectify':item.problemStatus == '0'}">
                  {{item.problemStatus == 0 ? '待整改' :
                  item.problemStatus == 1 ? '待审核' : 
                  item.problemStatus == 2 ? '已整改' : ''}}
                </td>
                <td>{{item.problemDeadline1}}</td>
                <td>{{item.problemDescription}}</td>
                <td>{{item.foundPlace}}</td>
                <td>
                  <div class="del"
                    authorization-btn="api/securityActivities/checkProblem/queryCheckProblemById"
                    ng-click="$state.go('rectificationDetail', {type: 'problem',id: item.problemId})">
                    <i class="fa fa-street-view color"></i>
                    <span class="shoushi">查看</span>
                  </div>                
                </td>
              </tr>
            </tbody>
          </table> 
        </form>
        <div class="pagination-outer">
          <uib-pagination
            total-items="specialCheckItemList.paginationData.total"
            ng-model="specialCheckItemList.paginationData.pageNum"
            items-per-page="specialCheckItemList.paginationData.pageSize"
            ng-change="pageChange()"
            class="pagination-sm"
            boundary-link-numbers="true"
            rotate="false"
            next-text="下一页"
            previous-text="上一页"></uib-pagination>
        </div>
      </div> -->
    </div>
  </div>
</div>

<!-- 内业外业的弹框 -->
<script type="text/ng-template" id="specialItemDetailDialog">
  <div class="item-detail-dialog specialCheck-dialog" >
    <div class="item-detail-dialog-header">
      <div class="title-txt">
        <span>{{vm.itemDetail1.checkClassifyName}}</span>
      </div>
    </div>
    <div class="item-detail-dialog-content">
      <div class="row-item">
        <div class="special-left-label">考核内容：</div>
        <div class="special-right-value">
          {{vm.itemDetailList.checkContent}}
        </div>
      </div>
      <div class="row-item">
        <div class="special-left-label">考核方法：</div>
        <div class="special-right-value">
          {{vm.itemDetailList.checkMethod}}
        </div>
      </div>
      <div class="row-item">
        <div class="special-left-label">标准分：</div>
        <div class="special-right-value">
          {{vm.itemDetail1.standardPoints}}分
        </div>
      </div>
      <div class="row-item">
        <div class="special-left-label">实得分：</div>
        <div class="special-right-value">
          <span class="after-rectify"
            ng-if="vm.itemDetail1.checkClassifyScore">
            {{vm.itemDetail1.checkClassifyScore}}分
          </span>
          <span ng-if="!vm.itemDetail1.checkClassifyScore">未打分</span>
        </div>
      </div>
      <!-- 打分详情 css在paDialog.scss -->
      <div class="kofen-detail" ng-if="vm.itemDetail1.checkClassifyScore">
        <div class="row-item kofen-detail-item"
          ng-repeat="item in vm.itemDetailList.scoreRecord">
          <span class="special-left-label-kofen">{{item.checkProjectDescribe}}</span>
          <span class="special-right-value-kofen"
            ng-class="{'after-rectify':item.score!=0}">{{vm.getCheckScore(item.score)}}</span>
        </div>
      </div>     
    </div>
  </div> 
</script>


